package com.lili.collection.mq.config;

import com.lili.collection.core.config.OutputConfig;
import com.lili.collection.core.domain.CollectCommonConfig;
import com.lili.collection.core.plugins.OutputPlugin;
import com.lili.collection.core.support.ConfigFieldDef;
import com.lili.collection.mq.plugins.PulsarmqOutputPlugin;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

/**
 *描述: Pulsarmq输出插件配置
 *@date: 2023/6/21  10:30
 *@author: lili
 */
@Slf4j
@Data
public class PulsarmqOutputConfig extends CollectCommonConfig implements OutputConfig {

    /**
     * 服务地址
     */
    @ConfigFieldDef(type = ConfigFieldDef.Type.STRING, required = true)
    private String serviceUrl;

    /**
     * 命名空间角色token
     */
    @ConfigFieldDef(type = ConfigFieldDef.Type.STRING, required = false)
    private String token;

    /**
     * 主题
     */
    @ConfigFieldDef(type = ConfigFieldDef.Type.STRING, required = true)
    private String topic;


    @Override
    public OutputPlugin getPlugin() {
        return new PulsarmqOutputPlugin();
    }
}